home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-12-13 | 10.0 KB | 407 lines | [TEXT/KAHL] |
- Ok, this ia an attempt to tell you what I have done to the arashi src code
- so that some of it may be added to the src possibly.
-
-
-
- To give an extra life at every 20,000 I did the following.....
-
- In STPlayer.c
-
- #define freeLifeScore (20000) /* (mz) */
-
- void IncreaseScore(points)
- long points;
- {
-
- int flashcount;
-
- Hero.score+=points;
- Hero.drawscore= 1;
- if (Hero.score > Hero.freeLives) /* check for free life (mz) */
- {
- PlayB(ZZFreeLife,999); /* play free life sound (mz) */
- if(!PlayOptions->noLoudSounds)
- PlayA(ZZFreeLife,999);
- Hero.NewLifeColorInvert=1; /* set flash flag (mz) */
- AddLife();
- Hero.freeLives = Hero.score - (Hero.score % freeLifeScore) + freeLifeScore;
- /* round score up to next interval */
- }
- }
- The free life sound was added to STORM.h
- added to the end of the list...
-
- Whiz, /* Flying plasma */
- Zroom, /* Splitting tanker */
- ZZFreeLife /* Chime for free life (mz) */
-
- };
-
- To cause a flash after a Free Life, in UpdatePlayer()
-
- /* added check for NLCI to revert colors (mz) */
- if((Hero.superzapping==1 || Hero.NewLifeColorInvert) && Hero.state != HeroFlying)
- {
- if ((!(Hero.NewLifeColorInvert)) || (Hero.NewLifeColorInvert==16))
- {
- ZapColorsHandle=GetResource('CLOT',ThisLevel.lvColor);
- Hero.NewLifeColorInvert=0;
- }
- else{ /* run through all colors twice to enhance flash (mz) */
- ZapColorsHandle=GetResource('CLOT',(Hero.NewLifeColorInvert & 8));
- Hero.NewLifeColorInvert++;
- }
- VASetColors(ZapColorsHandle);
- ReleaseResource(ZapColorsHandle);
- }
-
- and added
-
- long freeLives; /* Score needed for next free life (mz) */
- int NewLifeColorInvert; /* flag for unusual color invert (mz) */
-
- to the Hero structure in STORM.h
-
-
- ====================
-
-
- To implement the radio buttons for Practice or Arcade restart modes I did...
-
- to PlayOptions.h
-
- typedef struct
- {
- int absMoveFlag;
- int mouseSensitivity;
- int rotationType;
- int blankUnused;
- int monochrome;
- int soundOff;
- int noLoudSounds;
- int verticalGame;
- int sys607Sound;
- int restart; /* (mz) how to restart */
- } PlayOptionsRecord;
-
- in PlayOptions.c
-
- StaticHelpScreen,
- VerticalScreen,
- Sys607Sound,
- StaticRestartMode, ArcadeRestart, /* ( mz) */
- EasyRestart
-
- in DataToRadioButtons()
-
- SetStartItem(ArcadeRestart, PlayOptions->restart == 0); /* (mz) */
- SetStartItem(EasyRestart, PlayOptions->restart == 1);
-
-
- in DoStartupDialog()
-
-
- case ArcadeRestart: PlayOptions->restart=0; break;
- case EasyRestart: PlayOptions->restart=1; break;
-
-
-
- ===============
- The radio buttons were used to affect restart
-
- If Easy restart, player can select anything up lvl 96
- if Arcade restart, up to highest odd level in the last game.
- To affect restart and keep track of the last highest level....
-
- in GameLoop.c
-
- static highestLastLevel=9; /* global (mz) */
- .
- .
- .
- } while(Hero.lives>0 || Hero.state != HeroDead);
-
- highestLastLevel = ThisLevel.lvNumber - 2; /* at end of game save highest level */
-
-
- and....
-
- long PlayGame(HighScore,Options)
- long HighScore;
- int Options;
- {
- int i;
-
- Hero.score = -1;
- i=DoLevelSelect(highestLastLevel); /* transfer variable (mz) */
- if(i>=0)
- { VA.FrameSpeed=3;
- ThisLevel.lvNext=i;
- GameLoop(Options);
- }
-
- return Hero.score;
- }
-
- in STLevelSelect.c
-
- #include "PlayOptions.h"
-
- typedef struct
- {
- int levelresource;
- ColorSpec levelcolor;
- int levelnumber;
- int leveltemplate;
- long levelbonus; /* added field (mz) */
- } selectable;
-
- int CreateStable(stable,highestLastLevel)
- selectable *stable;
- int highestLastLevel; /* new (mz) */
- {
- register int thislev=128;
- register int levcount=0;
- register int colorresource;
- register ColorSpec **LCTable;
- register LevelInfo **LInfo;
-
- do
- { LInfo=(void *)GetResource('LEVL',thislev);
- if(LInfo==0) return levcount;
-
- colorresource = (*LInfo)->lvColor;
- LCTable = (void *)GetResource('CLOT',colorresource);
- stable[levcount].levelresource = (*LInfo)->lvField;
- stable[levcount].levelnumber = (*LInfo)->lvNumber;
- stable[levcount].levelcolor = (*LCTable)[8];
- stable[levcount].leveltemplate=thislev;
- /* stable[levcount].levelbonus = (long)(*LInfo)->flPoints*(*LInfo)->flCount +
- (long)(*LInfo)->puPoints*(*LInfo)->puCount +
- (long)(*LInfo)->fuPoints*(*LInfo)->fuCount +
- (long)(300 + ((*LInfo)->tk[0].points) )*(*LInfo)->tk[0].count +
- (long)(400 + ((*LInfo)->tk[1].points) )*(*LInfo)->tk[1].count +
- (long)(400 + ((*LInfo)->tk[2].points) )*(*LInfo)->tk[2].count; */
-
- The commented out code can be used to generate total score for a level
-
- stable[levcount].levelbonus = (*LInfo)->lvStBonus;/* starting bonus (mz) */
- thislev=(*LInfo)->lvNext + 1; /* choose odd lvls only(mz) */
-
- ReleaseResource(LCTable);
- ReleaseResource(LInfo);
-
- levcount++;
- } while(thislev != 128 && levcount < MAXSELECTABLES && (levcount <= (int)(highestLastLevel/2) || PlayOptions->restart));
- /* while cond will let player start up to highest odd level completed in last game (mz) */
- /* if in arcade mode (PlayOptions->restart==0), else PlayOptions->restart==1 so */
- /* the cond will contribute a true to the while() test. */
-
- return levcount;
- }
-
- int DoLevelSelect(highestLastLevel)
- int highestLastLevel;
-
- {...
-
- LastLevel=LastSelect=CreateStable(stable,*highestLastLevel)-1;
-
- .....}
-
- ==========
- to add a starting bonus I changed CreateSTable, as shown above to include the levelBonus
- field.
-
- and in DoLevelSelect()
-
- /* print level number below box */
- levelnum = thelevel+(theoffset>BoxSize.h/2 ? 1:0);
- VADrawPadNumber(stable[levelnum].levelnumber
- ,2*BoxSize.h+BoxSize.h/2,VA.frame.bottom-4*VA.segmscale,3);
-
- /* show starting level bonus on top of box */
- VADrawPadNumber(stable[levelnum].levelbonus,2*BoxSize.h+BoxSize.h/2 +3*VA.segmscale,
- VA.frame.bottom-(BoxSize.v)*(1.6),6);
-
- in GameLoop.c, I added a flag which flipped when the first level was cleared.
-
- void GameLoop(Options)
- int Options;
- {
- int i;
- int startLevel=0; /* flag for starting level (mz) */
-
- .....and added to the FlyThru section...
-
- if(Hero.state == HeroPlaying)
- { if(ThisLevel.edgeCount==ThisLevel.totalCount)
- { Hero.endtimer--;
- if(Hero.endtimer<=0)
- { Hero.state=HeroFlying;
- Hero.flydepth=0;
- if (!(startLevel)) /* check for starting level bonus (mz) */
- startLevel=1;
- levelComplete=1;
- levelStBonus=ThisLevel.lvStBonus;
- levelBonus=ThisLevel.lvBonus;
-
- }
- }
- }
-
-
- further up, I added...
-
- if(Hero.state != HeroDead)
- { AddLife();
- STLoadLevel();
- CreateFit();
- if (levelComplete == 1)
- {
- if (startLevel==1) /* check for starting level bonus (mz) */
- {
- startLevel++;
- IncreaseScore(levelStBonus);
- }
- IncreaseScore(levelBonus);
- }
- levelComplete = 0;
- levelBonus = 0;
- levelStBonus = 0;
- }
- Ths way, the bonus would only be given at the beginning of the next level. This made
- sure that the player did not die during the FlyThru and receive the bonus.
-
- ==============
- An end of level bonus was added with adding to GameLoop.c as shown in the clip above.
-
- ==============
- I updated the Advertise part of STLevelSelect.c
-
- ==============
-
- To use the new title animations, I made changes to Flashmain.c
-
- in main()
-
- case LOGOSTART:
- titlemain(ARASHIPICT, HORIZONTAL); /* */
- VASetColors(ColorHandle);
- SpecialEvent = NOEVENT;
- break;
-
- all of the other LOGO cases were dropped. variables were defined in demomain.h
- (from the PolyGet folder)
- #define ARASHIPICT 131
- #define GAMEOVERPICT 133
- #define HORIZONTAL 1
- #define VERTICAL 2
-
- and in Flash.h....
-
- /* void Logo(); */
-
- I commented out the Logo fcn to avoid a re-declaration.
-
- and added the demomain.c file to the project. I also removed the Logoeffects.c file
- from the project. I had to change the main() fcn in demomain.c to titlemain().
-
- to use the end of game msg I also had to change Highscores.c
-
- #include "demomain.h"
-
- in Highscores()
-
- /* GameOver(); */
- titlemain(GAMEOVERPICT, VERTICAL);
-
- in demomain.c, all of my changes were to the titlemain() fcn. I added a doneOnce
- variable to tell when the animation was done. I removed the display of the
- numbers in the upper right corner, I set up different dwseep varibale for
- HORIZONTAL and VERITCAL fades, also changed the search through the line segments
- idepending upon the fade direction.
- ==============
-
- I also changed the text messages in FlashMain.c main()
- case 10:
- ClearText();
- BoxActive = 0;
- /* SpecialEvent = DELAY; */
- break;
- case 11:
- case 12:
- case 13:
- break;
- case 14:
- InitZoomer();
- break;
-
- I nixed the text msgs 2 and 3, and added a BoxActive=0. I did this because I think
- it contributed to extra boxes showing up during the SpecialEvent=Delay case.
-
- ==============
-
- I changed the file signature to AR|F'
-
- Cleared the high scores, and changed various things in the RSRC file.
-
- I changed the volume keys to + and -.
-
- ==============
- for the superzap sound, I added to STPlayer.c in UpdatePlayer()
- if(ThisLevel.plSuperZaps>0)
- { ThisLevel.plSuperZaps--;
- Hero.superzapping= 1;
- PlayB(ZZSuperZap,998);
- if(!PlayOptions->noLoudSounds)
- PlayA(ZZSuperZap,998);
-
- ==============
- for only saving only Aracde mode scores I added some conditions in Highscores.c
-
- in highscores()
-
- if (PlayOptions->restart == 0)
- {
- /* read scores from resources */
- ScoreHand=GetResource('SCOR',128);
- HLock(ScoreHand);
- HiScores=(Initials *)*ScoreHand;
- ranking = Ranking(score);
- }
- .
- .
- .
- if (PlayOptions->restart == 0)
- {
- if(ranking<11)
- WriteCongrats();
- else if(ranking<51)
- WriteCongrats2();
- else {
- WriteNoCongrats(score);
- VAEraseBuffer();
- return;
- }
- }
- else {
- WriteScoreNotSaved();
- VAEraseBuffer();
- return;
- }
-
- and added the fcn WriteScoreNotSaved.
- ==============
- and finally, I think, to correct the Highscore phantoms,
-
- in ScrollScores()
-
- for(i=1;(i<=rank+2) && (i<51) ;i++) { /* extra check on high score (mz) */
- y=sy+(i-1)*(VA.segmscale*4+4);
- if( y >= VA.frame.bottom/4 && y < (VA.frame.bottom-(VA.segmscale*4+4))) {
-
- ........
-
- }
- if((i==rank+2) || (i==50)) { /* erase all 50's (mz) */